package com.thtf.logcollection.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    private static final Logger LOGGER = LoggerFactory.getLogger(IndexController.class);

    @GetMapping(name = "hello")
    public String hello() {
        LOGGER.error("测试异常，哈哈哈哈哈");
        if (true) {
            throw new RuntimeException("hello world");
        }
        return "hello world";
    }

}
